﻿<!DOCTYPE html>
<!--安全作业方案审批-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <script src="../../static/js/Mock/JobLicenseApp.js"></script>
    <script src="../../static/js/Resource/JobLicenseApp.js"></script>
    <style>
        /*说明：
         由于mystyle.css中162行.el-form-item__content {line-height: normal!important;}导致的
         index.css中.el-form-item--mini .el-form-item__content, .el-form-item--mini .el-form-item__label{    line-height: 28px;}失效
         但出于无法修改样式表的情况，所以在该页面添加以下样式，以保证页面内标题和内容不偏离
        */
        .el-form-item--mini .el-form-item__content,
        .el-form-item--mini .el-form-item__label {
            line-height: 28px !important;
            color: #000;
            padding: 0 !important
        }

        .el-form-item {
            margin-bottom: 0px !important;
        }
    </style>
    <style>
        body {
            padding-bottom: 10px;
        }

        table {
            width: 100%;
            border-top: 1px solid;
            border-left: 1px solid;
            text-align: center;
            /*border-right: none;*/
        }

        table td {
            border-right: 1px solid;
            border-bottom: 1px solid;
            /*height:38px;*/
            padding: 10px;
        }

        .el-col {
            padding: 10px;
            font-size: 14px
        }

        .el-form-item {
            margin-bottom: 0px !important;
        }

        .el-input-group__prepend,
        .el-input__inner {
            color: #000;
            font-size: 14px
        }
    </style>
</head>

<body>
    
<div id="app" v-cloak>   
        <!--标题-->
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">安全作业方案</label>
        </div>
        <el-form :model="Form" status-icon size="mini" label-position="right" style="margin-top:5px;">
            <!--<el-form :model="Form" status-icon style="margin-top:5px;width:100%">-->
            <el-row>
                <!--编制日期-->
                <el-col span="11" style="height:40px;">
                    <div class="elst-select-mini">
                        <el-form-item :label="JobSafetyHomeWork.OrganizationDate+mark.m">
                            {{Form.OrganizationDate}}
                        </el-form-item>
                    </div>
                </el-col>
                <!--Q/G11-018-R01-->
                <el-col span="4" style=" height:40px;" offset="6">
                    <el-form-item>
                        {{JobSafetyAnalysisList.HeadNumber}}
                    </el-form-item>
                </el-col>
                <!--作业单编号-->
                <el-col span="3" class="fr" style=" height:40px;">
                    <el-form-item :label="JobSafetyHomeWork.ApplicationNumber+mark.m">
                        {{Form.ApplicationNumberValue}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--表格|作业名称-->
            <el-row style="border:1px solid;" offset="2">
                <el-col span="8">
                    <el-form-item :label="JobSafetyHomeWork.HomeworkName+mark.m">
                        {{Form.HomeworkName}}
                    </el-form-item>
                </el-col>
                <!--作业负责人-->
                <el-col span="8" style=" " offset="6">
                    <el-form-item :label="JobSafetyHomeWork.HomeworkLeadingCadre+mark.m ">
                        {{Form.HomeworkLeadingCadre}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--作业地点-->
            <el-row style="border:1px solid;border-top:0px;" offset="2">
                <el-col span="8">
                    <el-form-item :label="JobSafetyHomeWork.HomeworkPlace+mark.m">
                        {{Form.HomeworkPlace}}
                    </el-form-item>
                </el-col>
                <!--作业起始时间-->
                <el-col span="8" style=" " offset="6">
                    <el-form-item :label="JobSafetyHomeWork.BeginHomeworkTime+mark.m ">
                        {{Form.JobManagere}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--作业人员-->
            <el-row style="border:1px solid;border-top:0px;" offset="2">
                <el-col span="24">
                    <el-form-item :label="JobSafetyHomeWork.HomeworkNumber+mark.m">
                        {{Form.HomeworkNumber}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--所需工器具-->
            <el-row style="border:1px solid;border-top:0px;" offset="2">
                <el-col span="24">
                    <el-form-item :label="JobSafetyHomeWork.NeedTool+mark.m">
                        {{Form.NeedTool}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--所需材料-->
            <el-row style="border:1px solid;border-top:0px;" offset="2">
                <el-col span="24">
                    <el-form-item :label="JobSafetyHomeWork.NeedData+mark.m">
                        {{Form.NeedData}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--防护用品-->
            <el-row style="border:1px solid;border-top:0px;" offset="2">
                <el-col span="24">
                    <el-form-item :label="JobSafetyHomeWork.ProtectTool+mark.m">
                        {{Form.ProtectTool}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--需要办理的许可证-->
            <el-row style="border:1px solid;border-top:0px;">
                <el-col span="24">
                    <span class="fl">
                        {{JobSafetyHomeWork.NeedHandleAllow+mark.m}}
                    </span>
                    <el-form-item class="fl ml10">
                        <template>
                            <el-checkbox-group v-model="checkList">
                                <!--动火-->
                                <el-checkbox :label="JobSafetyHomeWork.UseFire"></el-checkbox>
                                <!--受限空间-->
                                <el-checkbox :label="JobSafetyHomeWork.RestrictedSpace"></el-checkbox>
                                <!--吊装-->
                                <el-checkbox :label="JobSafetyHomeWork.Hoisting"></el-checkbox>
                                <!--高处-->
                                <el-checkbox :label="JobSafetyHomeWork.HigherPlace"></el-checkbox>
                                <!--断路-->
                                <el-checkbox :label="JobSafetyHomeWork.Breakage"></el-checkbox>
                                <!--动土-->
                                <el-checkbox :label="JobSafetyHomeWork.EarthMoving"></el-checkbox>
                                <!--盲板抽堵-->
                                <el-checkbox :label="JobSafetyHomeWork.BlindPlateTakeWall"></el-checkbox>
                                <!--设备检维修-->
                                <el-checkbox :label="JobSafetyHomeWork.DeviceInspectRepair"></el-checkbox>
                                <!--临时用电-->
                                <el-checkbox :label="JobSafetyHomeWork.UserPower"></el-checkbox>
                                <!--其他-->
                                <el-checkbox :label="JobSafetyHomeWork.Other"></el-checkbox>
                            </el-checkbox-group>
                        </template>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--工作流程描述-->
            <!--一、作业任务-->
            <el-row style="border:1px  solid; border-top:0px;text-align: center">
                <el-col span="24" style="">
                    <span>
                        {{JobSafetyHomeWork.HomeworkPathDescribe+mark.m}}
                    </span>
                </el-col>
            </el-row>

            <el-row style="border:1px  solid; border-top:0px;">
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        <el-form-item :label="JobSafetyHomeWork.HomeworkTask+mark.m">
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        {{Form.HomeworkTask}}
                    </el-col>
                </el-row>
            </el-row>
            <!--二、作业部署、方法-->
            <el-row style="border:1px  solid; border-top:0px;">
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        <el-form-item :label="JobSafetyHomeWork.HomeworkDeploy+mark.m">
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        {{Form.HomeworkDeploy}}
                    </el-col>
                </el-row>
            </el-row>
            <!--三、图纸或算法-->
            <el-row style="border:1px  solid; border-top:0px;">
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        <el-form-item :label="JobSafetyHomeWork.DrawingOrCalculation+mark.m">
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        {{Form.DrawingOrCalculation}}
                    </el-col>
                </el-row>
            </el-row>
            <!--四、作业流程-->
            <el-row style="border:1px  solid; border-top:0px;">
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        <el-form-item :label="JobSafetyHomeWork.HomeworkPath+mark.m">
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        {{Form.HomeworkPath}}
                    </el-col>
                </el-row>
            </el-row>
            <!--五、安全技术措施-->
            <el-row style="border:1px  solid; border-top:0px;">
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        <el-form-item :label="JobSafetyHomeWork.SafeTechnology+mark.m">
                        </el-form-item>
                    </el-col>
                    <el-col span="24" style=" height:40px; ;padding-top:5px;">
                        <a href="#" @click="ClickIn('tj')">点击进入</a>
                    </el-col>
                </el-row>
            </el-row>
            <!--六、安全应急处理方案-->
            <el-row style="border:1px  solid; border-top:0px;">
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        <el-form-item :label="JobSafetyHomeWork.HomeworkEmergency+mark.m">
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="24" style=" height:40px; ">
                        {{Form.HomeworkEmergency}}
                    </el-col>
                </el-row>
            </el-row>
            <!--备注-->
            <el-row style="border:1px solid;border-top:0px;" offset="2">
                <el-col span="24">
                    <el-form-item :label="JobSafetyHomeWork.Remarks+mark.m">
                        {{Form.Remarks}}
                    </el-form-item>
                </el-col>
            </el-row>
            <!--安全作业方案会签人员-->
            <el-row style="border:1px  solid; border-top:0px; padding-bottom:20px;   ">
                <el-row>
                    <el-col :span="6">
                        <el-form-item :label="JobSafetyHomeWork.SafeHomeworkSignMember+mark.m">
                        </el-form-item>
                    </el-col>
                    <el-col :span="18">
                        <signature v-model="value"></signature>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="24" style="  padding:0 30px; ">
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="10%">{{JobSafetyHomeWork.id}}</td>
                                <td width="25%">{{JobSafetyHomeWork.Unit}}</td>
                                <td width="25%">{{JobSafetyHomeWork.SignMember}}</td>
                                <td width="40%">{{JobSafetyHomeWork.ParterSignAndDate}}</td>
                            </tr>
                            <tr v-for="(v,i) in Form.ParticipateJSPAnalysts">
                                <td>{{i+1}}</td>
                                <td>{{v.Unit}}</td>
                                <td>{{v.SignMember}}</td>
                                <td>
                                    <!--{{v.SignName}}-->

                                    <span style="float:left;text-align:center;width:50%;">
                                        <signature v-model="SignValue" :disabled="false"></signature>
                                    </span>
                                    <span style="float:left;text-align:center;width:50%;">{{v.SignDate}}</span>

                                </td>
                            </tr>
                        </table>
                        <!--<el-table :data="Form.ParticipateJSPAnalysts"
                                  border
                                  style="width: 90%">
                            <el-table-column prop="id"
                                             :label="JobSafetyHomeWork.id" width="55">
                            </el-table-column>
                            <el-table-column prop="Unit"
                                             :label="JobSafetyHomeWork.Unit">
                            </el-table-column>
                            <el-table-column prop="SignMember"
                                             :label="JobSafetyHomeWork.SignMember">
                            </el-table-column>
                            <el-table-column :label="JobSafetyHomeWork.ParterSignAndDate">
                                <el-table-column :label="JobSafetyHomeWork.SignName" prop="SignName">

                                </el-table-column>
                                <el-table-column :label="JobSafetyHomeWork.SignDate" prop="SignDate">

                                </el-table-column>
                            </el-table-column>
                        </el-table>-->
                    </el-col>
                </el-row>
            </el-row>
            <!--作业人员安全技术交底确认-->
            <el-row style="border:1px solid;height:180px;border-top:0px;">
                <el-col span="24">

                    <el-form-item :label="JobSafetyHomeWork.HomeworkSafeTechnology+mark.m">
                        <template>
                            <el-checkbox-group v-model="checkList">
                                <el-row>
                                    <el-col>
                                        <!--厂级安全教育-->
                                        <el-checkbox :label="JobSafetyHomeWork.FactorySafeEducation"></el-checkbox>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col>
                                        <!--属地安全教育/安全告知-->
                                        <el-checkbox :label="JobSafetyHomeWork.TerritorialitySafeEducation">
                                        </el-checkbox>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col>
                                        <!--本次作业方案沟通落实-->
                                        <el-checkbox :label="JobSafetyHomeWork.ThisHomeworkProgrammeCommunicate">
                                        </el-checkbox>
                                    </el-col>
                                </el-row>
                            </el-checkbox-group>
                        </template>
                    </el-form-item>
                </el-col>
            </el-row>

            <!--下方按钮-->
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <!--提交-->
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <!--弹窗-->
        <el-dialog title="" fullscreen="true" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                SignValue: '/static/images/signature.png',
                Form: {
                    ParticipateJSPAnalysts: [],
                    HomeworkName: '',
                    HomeworkLeadingCadre: '',
                    HomeworkPlace: '',
                    HomeworkNumber: '',
                    NeedTool: '',
                    NeedData: '',
                    ProtectTool: '',

                    HomeworkTask: '',
                    HomeworkDeploy: '',
                    DrawingOrCalculation: '',
                    HomeworkPath: '',
                    SafeTechnology: '',
                    HomeworkEmergency: '',
                    Remarks: '',

                    Remarks: '',
                },
                rules: {},
                ListItem: ListItem,
                checkList: ['选中且禁用', '复选框 A'],
                value: ''
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleNodeClick: function (data) {

                },
                //此处需要更改为公用JS下api
                getData: function () {
                    getData(this, '/api/JobLicenseApp/get?id=' + this.id);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    //this.$refs[formName].validate(function (valid) {
                    //    //验证通过
                    //    if (valid) {
                    onSubmitForm(this, '/api/JobLicenseApp/Save', mythis.Form);
                    //} else {
                    //    //验证失败
                    //    return false;
                    //}
                    //});
                },
                //点击进入按钮
                ClickIn: function (val, id) { DialogShow(this, val, "../GeneralLiftingWorkSafety/RiskInformationBase.html", id); },
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //if (this.id == null) {
                var dateTime = new Date();
                //getData(this, '/api/JobLicenseManagement/getA?id=' + this.id);
                this.Form.HomeworkName = "作业名称";
                this.Form.HomeworkLeadingCadre = "作业负责人";
                this.Form.HomeworkPlace = "作业地点";
                this.Form.HomeworkNumber = "作业人员";
                this.Form.NeedTool = "所需工器具";
                this.Form.NeedData = "所需材料";
                this.Form.ProtectTool = "防护用具";
                this.Form.HomeworkTask = "作业任务XXXXXXXXXXXXXXXXXXXXX";
                this.Form.HomeworkDeploy = "作业部署、作业XXXXXXXXXXXXXXXXXXXXXXX";
                this.Form.DrawingOrCalculation = "图纸或计算XXXXXXXXXXXXXXXX";
                this.Form.HomeworkPath = "作业流程XXXXXXXXXXXXXXXX";
                this.Form.SafeTechnology = "安全技术措施XXXXXXXXXXXXXXXX";
                this.Form.HomeworkEmergency = "安全应急处理方案XXXXXXXXXXXXXXXX";
                this.Form.Remarks = "备注"
                this.Form.OrganizationDate = dateTime.getFullYear() + "-" + dateTime.getMonth() + "-" + dateTime.getDate();
                this.Form.ApplicationNumberValue = "001";
                this.Form.JobManagere = "张三";
                //}
                for (var i = 0; i < 5; i++) {
                    this.Form.ParticipateJSPAnalysts.push({
                        Unit: '某单位' + i,
                        SignMember: Mock.Random.cname(),
                        SignName: Mock.Random.cname(),
                        SignDate: Mock.Random.date(),
                    })
                }
            }
        });
    </script>

</body>

</html>